<div class="wide form">

<?php 
$cs=Yii::app()->clientScript;
//$cs->registerCssFile(Yii::app()->baseUrl.'/assets/289ede29/jui/css/ui-lightness/jquery-ui-1.8.18.custom.css');
//$cs->registerCssFile(Yii::app()->baseUrl.'/css/own.css');
$cs->registerCoreScript(Yii::app()->baseUrl.'/js/jquery.min.js');
//$cs->registerScriptFile(Yii::app()->baseUrl.'/js/jui/js/jquery-ui.min.js');
$cs->registerScriptFile(Yii::app()->baseUrl.'/js/string.prototype.js');
$cs->registerScriptFile(Yii::app()->baseUrl.'/js/templatesearch.js');
	
$form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<!--<div class="row">
		<?php echo $form->label($model,'templateId'); ?>
		<?php echo $form->textField($model,'templateId'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'templateCategoryId'); ?>
		<?php echo $form->textField($model,'templateCategoryId'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'userId'); ?>
		<?php echo $form->textField($model,'userId'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'templateType'); ?>
		<?php echo $form->textField($model,'templateType'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'templateBody'); ?>
		<?php echo $form->textArea($model,'templateBody',array('rows'=>6, 'cols'=>50)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'buyTimes'); ?>
		<?php echo $form->textField($model,'buyTimes'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'prices'); ?>
		<?php echo $form->textField($model,'prices',array('size'=>2,'maxlength'=>2)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'created'); ?>
		<?php echo $form->textField($model,'created'); ?>
	</div>

	-->
	<div style="display:inline">Main Categories:<select name='mainCategory' id='mainCategory'></select>
Sub Categories: <?php echo $form->dropDownList($model, 'templateCategoryId', array() ,array('id'=>'subCategory'))?>
</div><br/>
<div style="display:inline">Keywords (seperated by comma ,)<input type="text" style="width:400px" name="keywords" id="keywords"/></div>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton('Search'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->